package org.rasterfun.language2

/**
 * Represents a type.
 */
class Kind(name: String, compiledName: String) {

	/**
	 * The common supertype of this and the other specified Kind, or UndefinedKind if they don't have any.
	 */
	def commonType(other: Kind): Kind = {
		if (other == this) this
		else UndefinedKind
	}

}

case object UndefinedKind extends Kind(null, null)
case object NumKind extends Kind("num", "float")
case object BoolKind extends Kind("bool", "boolean")


